<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
		<title>主题模板 -- Powered by CentIMS {$core_version}</title>
		<link href="{'bootstrap/css/bootstrap.css'|shared}" rel="stylesheet"/>
		<link href="{'bootstrap/css/bootstrap-responsive.css'|shared}" rel="stylesheet"/>
		<link href="{'plugins/ztree/ztree.css'|jquery}" rel="stylesheet"/>
		<link href="{'common.css'|shared}" rel="stylesheet"/>
		{'theme_list_head'|fire}
	</head>
	<body>
		<div class="workspace">
			<ul class="nav nav-tabs">
				<li>&nbsp;&nbsp;</li>	
			    <li class="active"><a href="#">主题列表</a></li>
			    <li><a href="./?Ctlr=PageType">页面类型</a></li>
			    <li><a href="./?Ctlr=AddTheme">新增主题</a></li>			    
		    </ul>
		    <div>
				<form class="well form-inline" method="get" action=".">				    
				    <input type="text" class="input-small" name="name" value="{$name}" placeholder="主题"/>
				    <button type="submit" class="btn">搜索</button>
			    </form>
		    </div>
		    <table id="group-list" class="table table-striped table-bordered table-condensed">
				<thead>
					<tr>
						<th class="col_chk"></th>
						<th class="w150">{'主题'|sorth:name:$curl}</th>
						<th class="w150">页面类型</th>
						<th class="wa">模板文件</th>	
						<th class="w150 txt-ac">操作</th>
					</tr>
				</thead>
				<tbody id="themes">					
					{foreach from=$items item=item}
					<tr class="group-head">
						<td class="col_chk">
							{if $item.selected}
							<i class="icon-star"></i>
							{/if}
						</td>
						<td colspan="3">
							<i class="handler icon-plus-sign" id="tpl_{$item.theme_id}"></i>
							<span class="label label-info">{$item.name}</span>	
							<span class="txt-info">{$item.note|escape}</span>						
						</td>						
						<td class="tools">{'theme_options'|fire:$item}</td>
					</tr>
					{'theme_templates'|fire:$item}
					{foreachelse}
					<tr>
						<td colspan="5" class="txt-ac">无记录</td>
					</tr>
					{/foreach}
				</tbody>
			</table>							    	
		</div>
		
		<div class="modal hide" id="tpl-selector">
		  	<div class="modal-header">
			    <button class="close" data-dismiss="modal">×</button>
			    <h3>选择模板</h3>
		  	</div>
		  	
			<div class="modal-body" style="height:250px;overflow:auto;">
				<ul class="ztree" id="tpls-tree"></ul>
			</div>
						  
			<div class="modal-footer">
				<span id="tpl-info" class="label label-warning" style="margin-right:15px;display:none;">请选择模板!</span>
				<a href="#" class="btn" id="btn-close-form">关闭</a>
				<a href="#" class="btn btn-primary" id="btn-done">确定</a>
			</div>
		</div>
		
		<script type="text/javascript" src="{'jquery-1.7.1.js'|jquery}"></script>
		<script type="text/javascript" src="{'bootstrap/bootstrap.js'|shared}"></script>
		<script type="text/javascript" src="{'common.js'|shared}"></script>
		<script type="text/javascript" src="{'plugins/ztree/ztree.js'|jquery}"></script>
		<script type="text/javascript">
			var tplNodes = {$nodes};
		</script>		
		<script type="text/javascript" src="list.js"></script>		
		{'group_list_foot'|fire}
	</body>
</html>